/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2023-11-24 15:12:46
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2023-11-27 16:31:37
 * @FilePath: \ZHGD-Vue2\src\api\ReportDesign\ReportDesign.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";
// 报表设设计器

// 查询
export const selectCustomReportPageLike = (params) => {
    return request({
        url: "/system/customReport/selectCustomReportPageLike",
        method: 'get',
        params
    })
}
// 添加 模版/报表
export const insertCustomReport = (data) => {
    return request({
        url: "/system/customReport/insertCustomReport",
        method: "post",
        data
    })
}
// 删除
export const deleteCustomReport = (data) => {
    return request({
        url: "/system/customReport/deleteCustomReport",
        method: "post",
        data
    })
}
// 查询
export const selectCustomReportByIds = (data, params) => {
    return request({
        url: "/system/customReport/selectCustomReportByIds",
        method: "post",
        data,
        params
    })
}
// 修改
export const updateCustomReport = (data) => {
    return request({
        url: "/system/customReport/updateCustomReport",
        method: "post",
        data
    })
}
// 自定义接口调用 - get
export const customInterface_get = (url, params) => {
    return request({
        url,
        method: "get",
        params
    })
}
// 自定义接口调用 - post
export const customInterface_post = (url, data) => {
    return request({
        url,
        method: "post",
        data
    })
}
// 积木报表导出 excel
export const exportAllExcelStream = (data) => {
    return request({
        url: "/jmreport/exportAllExcelStream",
        method: "post",
        data,
        responseType: 'blob',
        timeout: 300000
    })
}

// 积木报表导出 pdf
export const exportPdfStream = (data) => {
    return request({
        url: "/jmreport/exportPdfStream",
        method: "post",
        data,
        responseType: 'blob',
        timeout: 300000
    })
}
